package rs.networx.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="nottifications")
public class Nottification implements Serializable{

	private static final long serialVersionUID = 723054708L;

	@Id
	@GeneratedValue(strategy=IDENTITY)
	@Column(name="nottification_id", unique=true, nullable=false)
	private Integer id;

	@ManyToOne
	@JoinColumn(name="owner_id", referencedColumnName="person_id", nullable=false)
	private Person owner;
	
	@Column(name="type", unique=false, nullable=false)
	private Integer type;
	
	@Column(name="target_id", unique=false, nullable=false)
	private Integer targetID;
	
	@Column(name="link", unique=false, nullable=false)
	private String link;
	
	@Column(name="viewed", unique=false, nullable=false)
	private Boolean viewed;

	public Boolean getViewed() {
		return viewed;
	}

	public void setViewed(Boolean viewed) {
		this.viewed = viewed;
	}

	public Integer getType() {
		return type;
	}

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public Integer getTargetID() {
		return targetID;
	}

	public void setTargetID(Integer targetID) {
		this.targetID = targetID;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	public Person getOwner() {
		return owner;
	}

	public void setOwner(Person owner) {
		this.owner = owner;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Integer getId() {
		return id;
	}

	public Nottification() {
	}

	public String toString() {
		return "Panel" + " id=" + id + " type=" + type + " target=" + targetID + " viewed=" + viewed;
	}


}